function createDialogHut(dialogId, dialogTitle, dialogUrl,nowid)
{
    var url = dialogUrl;

    $("<div>").attr("id",dialogId).dialog(
        {
            iconCls:'icon-save2',
            title : dialogTitle,
            width : '70%',
            height : '100%',
            closed : false,
            cache : false,
            draggable : false,
            href : url,
            modal : true,
            shadow:true,
            onClose : function()
            {
                $("#pcdg").datagrid("clearChecked");
                $("#pdg").datagrid("clearChecked");
                $("#purdg").datagrid("clearChecked");
                $("#rdg").datagrid("clearChecked");
                $(this).dialog('destroy');
            },
            onLoad:function () {
                $("#editProC-form").form('load','getRowData?pcid='+nowid);
                $("#detailsProC-form").form('load','getRowData?pcid='+nowid);
                $("#ProDetails-form").form('load','getRowData2?pid='+nowid);
                $("#editPro-form").form('load','getRowData2?pid='+nowid);
                $("#editPurchase-form").form('load','getRowData3?purid='+nowid);
                $("#showPurchase-form").form('load','getRowData3?purid='+nowid);
                $("#editRepository-form").form('load','getRowData4?rid='+nowid);
            },
            onOpen:function () {
                $("#editProC-form").form('load','getRowData?pcid='+nowid);
                $("#detailsProC-form").form('load','getRowData?pcid='+nowid);
                $("#ProDetails-form").form('load','getRowData2?pid='+nowid);
                $("#editPro-form").form('load','getRowData2?pid='+nowid);
                $("#editPurchase-form").form('load','getRowData3?purid='+nowid);
                $("#showPurchase-form").form('load','getRowData3?purid='+nowid);
                $("#editRepository-form").form('load','getRowData4?rid='+nowid);
            }
        });
}
